package apache.methodUtil;

import org.apache.commons.beanutils.MethodUtils;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-12-05
 * Time: 下午3:47
 * Description: ${description}
 */
public class MethodUtilTest {
    public static void main(String[] args) throws NoSuchMethodException {
        //取不到方法
        System.out.println(MethodUtils.getAccessibleMethod(Test.class, "a", int.class));
        //可以取到方法
        System.out.println(Test.class.getMethod("a",int.class));
    }
}

class Test {

    public void a (int a ) {
        System.out.println("My name is a ");
    }


}